package com.lry.crawlers.message.service.impl;

import com.lry.crawlers.message.entity.Message;
import com.lry.crawlers.message.mapper.MessageMapper;
import com.lry.crawlers.message.service.MessageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class MessageServiceImpl implements MessageService {
    @Autowired
    MessageMapper messageMapper;

    @Override
    public List<Message> getMessages() {
        return messageMapper.selectList(null);
    }

    @Override
    public int setMessage(Message message) {
        return messageMapper.insert(message);
    }
}
